import React, { Component } from "react";
import { Layout, Tabs } from "antd";
const TabPane = Tabs.TabPane;
const { Content } = Layout;

class ContentComponent extends Component {
  render() {
    const {
      contentTabPanes,
      activeTabKey,
      onTabClick,
      onTabClose
    } = this.props;
    debugger;
    return (
      <Content>
        <Tabs
          type="editable-card"
          activeKey={activeTabKey}
          onTabClick={onTabClick}
          onEdit={onTabClose}
          hideAdd
        >
          {contentTabPanes.map(pane => (
            <TabPane tab={pane.title} key={pane.id}>
              {pane.content}
            </TabPane>
          ))}
        </Tabs>
      </Content>
    );
  }
}
export default ContentComponent;
